<?php $atr=array(
					"name"=>"project",
					"onsubmit"=>"return checkProject()"
				  ); 
echo form_open('project/insert',$atr); ?> 
  
<?php $bar= 'Project List';?>
<table cellspacing="1" align="right" id="box-table-a" width="900px">
	<tr><td colspan=7 align=right class=bar><?php echo $bar;?></td></tr>   		
   		<tr>
   			<th>Project_ID</th>
   			<th>ProjectName</th>
   			<th>BeginDate</th>
   			<th>EndDate</th>
   			<th>Lab_ID</th> 
   			<th>Action</th>  			
   		</tr> 		
 		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>
			<?php //$this->session->set_userdata('Customer_ID', $row->Customer_ID);?>			
			<td class="row1"><?php echo $row->Project_ID; ?> </td>
			<td class="row1"><?php echo $row->ProjectName ;?> </td>
			<td class="row1"><?php echo $row->BeginDate;?> </td>
			<td class="row1"><?php echo $row->EndDate;?> </td>
			<td class="row1"><?php echo $row->Lab_ID;?> </td>
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("project/edit/$row->Project_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("project/delete/$row->Project_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>		
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="Project_ID" readonly="readonly"/></td>
   			<td><input type= "text" name ="ProjectName"/></td>
   			<td><input type= "text" name ="BeginDate" onkeyup="dtval(this,event)" maxlength="10"/></td>
   			<td><input type= "text" name ="EndDate" onkeyup="dtval(this,event)" maxlength="10"/></td>
   		    <td><?php echo form_dropdown('Lab_ID',$project );?></td>   			
   			<td><input type="submit" id="submit" value="insert"/> </td>
   		</tr>
   		<tr>
   			<td colspan="6"><?php echo $this->pagination->create_links(); // tạo link phân trang?>  </td>
   		</tr>
   		<tr>
   			<td colspan="6" id="abc"> 
   				<?php if (isset($error)){
					echo "<br/>";   			
			   		echo $error;
					echo '<br/>';
					form_close();
		   		}?>
		   		
		   	 </td>
   		</tr>
   	</table>   		
   	
 <?php }?>
